#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int f(int x)
{
	int q = 0;
	int i = 0;
	int a = 1;
	int b = 1;
	if (x > 2)
	{
		for (i = 3; i <= x; i++)
		{
			q = a + b;
			a = b;
			b = q;
		}
	}
	else
		q = 1;
	return q;
}
int main()
{
	int a = 0;
	scanf("%d", &a);
	printf("%d",f(a));
	return 0;
}